<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .card {
        width: 300px;
        height: 500px;
        overflow: hidden;
        position: relative;
        --direc: 0deg;
        color: red;
        font-size: 2rem;
        background-image: linear-gradient(
          var(--direc),
          #5ddcff,
          #3c67e3,
          49%,
          #4e00c2
        );
        animation: spin 3s linear infinite;
      }
      .card::after {
        content: "";
        position: absolute;
        inset: 8px;
        background: #191c29;
        border-radius: inherit;
      }
      @property --direc {
        syntax: "<angle>";
        initial-value: 0deg;
        inherits: false;
      }
      @keyframes spin {
        to {
          --direc: 360deg;
        }
      }
    </style>
  </head>
  <body>
    <div class="card"></div>
  </body>
</html>
